<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2022\3\7 0007
 * Time: 16:12
 */

//$time1=strtotime($begin);
//$time2=strtotime($end);
////$res=range('1640855321', '1640855726', '86400');
//$timediff = abs($time2 - $time1);
//$days = round($timediff / 86400,1);
//var_dump($days);
//die();
//
//var_dump($res);
//$time1=date("Y-m-d H:i:s",1640855321);
//$time2=date("Y-m-d H:i:s",1640855726);
//var_dump($time1);
//var_dump($time2);
//die();
$begin='2021-12-31 19:08:41';
$end= '2021-12-30 17:15:26';

$begin = strtotime($begin);
$end = strtotime($end);

$time_range = range($begin, $end, 86400);
var_dump($time_range);
die();
//$res= date('w',33);
//var_dump($res);
//die();
$count = 0;
foreach ($time_range as $tv) {
    if (date('w', $tv) == 0 or date('w', $tv) == 6) {
        $count = $count + 1;
    }
}
echo     $count;
die();
$data_res['process_time'] = max(round((strtotime( $end) - strtotime($begin)) / 86400 - $count, 1), 1);
 var_dump($data_res);
